﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Sys
{
    [Table("SysRolePermission")]
    public class SysRolePermission : BaseEntity
    {
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid RolePermissionId { get; set; }

        [Required]
        [Column(TypeName = "uuid")]
        public Guid RoleId { get; set; }

        [Required]
        [Column(TypeName = "uuid")]
        public Guid MenuFuncId { get; set; }

        [ForeignKey("RoleId")]
        public virtual SysRole SysRoles { get; set; }

        [ForeignKey("MenuFuncId")]
        public virtual SysMenuFunc SysMenuFunc { get; set; }
    }
}